<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>JsDoc Reference - Grid.Store</title>

		<style type="text/css">
			/* default.css */
body
{
	font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
	width: 800px;
}

.header
{
	clear: both;
	background-color: #ccc;
	padding: 8px;
}

h1
{
	font-size: 150%;
	font-weight: bold;
	padding: 0;
	margin: 1em 0 0 .3em;
}

hr
{
	border: none 0;
	border-top: 1px solid #7F8FB1;
	height: 1px;
}

pre.code
{
	display: block;
	padding: 8px;
	border: 1px dashed #ccc;
}

#index
{
	margin-top: 24px;
	float: left;
	width: 160px;
	position: absolute;
	left: 8px;
	background-color: #F3F3F3;
	padding: 8px;
}

#content
{
	margin-left: 190px;
	width: 600px;
}

.classList
{
	list-style-type: none;
	padding: 0;
	margin: 0 0 0 8px;
	font-family: arial, sans-serif;
	font-size: 1em;
	overflow: auto;
}

.classList li
{
	padding: 0;
	margin: 0 0 8px 0;
}

.summaryTable { width: 100%; }

h1.classTitle
{
	font-size:170%;
	line-height:130%;
}

h2 { font-size: 110%; }
caption, div.sectionTitle
{
	background-color: #7F8FB1;
	color: #fff;
	font-size:130%;
	text-align: left;
	padding: 2px 6px 2px 6px;
	border: 1px #7F8FB1 solid;
}

div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }

.summaryTable td
{
	vertical-align: top;
	padding: 4px;
	border-bottom: 1px #7F8FB1 solid;
	border-right: 1px #7F8FB1 solid;
}

/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
	border-left: 1px #7F8FB1 solid;
	width: 140px;
	text-align: right;
}

td.attributes, .fixedFont
{
	line-height: 15px;
	color: #002EBE;
	font-family: "Courier New",Courier,monospace;
	font-size: 13px;
}

.summaryTable td.nameDescription
{
	text-align: left;
	font-size: 13px;
	line-height: 15px;
}

.summaryTable td.nameDescription, .description
{
	line-height: 15px;
	padding: 4px;
	padding-left: 4px;
}

.summaryTable { margin-bottom: 8px; }

ul.inheritsList
{
	list-style: square;
	margin-left: 20px;
	padding-left: 0;
}

.detailList {
	margin-left: 20px; 
	line-height: 15px;
}
.detailList dt { margin-left: 20px; }

.detailList .heading
{
	font-weight: bold;
	padding-bottom: 6px;
	margin-left: 0;
}

.light, td.attributes, .light a:link, .light a:visited
{
	color: #777;
	font-style: italic;
}

.fineprint
{
	text-align: right;
	font-size: 10px;
}
		</style>
	</head>

	<body>
<!-- ============================== header ================================= -->	
		<!-- begin static/header.html -->
		<div id="header">
</div>
		<!-- end static/header.html -->

<!-- ============================== classes index ============================ -->
		<div id="index">
			<!-- begin publish.classesIndex -->
			<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
	
	<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
	
	<li><a href="../symbols/Grid.html">Grid</a></li>
	
	<li><a href="../symbols/Grid.EidtGrid.html">Grid.EidtGrid</a></li>
	
	<li><a href="../symbols/Grid.Grid.html">Grid.Grid</a></li>
	
	<li><a href="../symbols/Grid.LoadMask.html">Grid.LoadMask</a></li>
	
	<li><a href="../symbols/Grid.PaggingBar.html">Grid.PaggingBar</a></li>
	
	<li><a href="../symbols/Grid.Store.html">Grid.Store</a></li>
	
	<li><a href="../symbols/Grid.Util.html">Grid.Util</a></li>
	
	<li><a href="../symbols/Grid.Util.Format.html">Grid.Util.Format</a></li>
	
	<li><a href="../symbols/Grid.Util.FormHelpr.html">Grid.Util.FormHelpr</a></li>
	
</ul>
<hr />
			<!-- end publish.classesIndex -->
		</div>
		
		<div id="content">
<!-- ============================== class title ============================ -->
			<h1 class="classTitle">
				
				Class Grid.Store
			</h1>

<!-- ============================== class summary ========================== -->			
			<p class="description">
				
				
			
				数据缓冲类
				
				
					<br /><i>Defined in: </i> <a href="../symbols/src/git_gallery_grid_1.0_store.js.html">store.js</a>.
				
			</p>

<!-- ============================== constructor summary ==================== -->			
			
			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class Grid.Store.">
				<caption>Class Summary</caption>
				<thead>
					<tr>
						<th scope="col">Constructor Attributes</th>
						<th scope="col">Constructor Name and Description</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="attributes">&nbsp;</td>
						<td class="nameDescription" >
							<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#constructor">Grid.Store</a></b>(config)
							</div>
							<div class="description">数据缓冲类，缓存数据在浏览器中</div>
						</td>
					</tr>
				</tbody>
			</table>
			

<!-- ============================== properties summary ===================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class Grid.Store.">
					<caption>Field Summary</caption>
					<thead>
						<tr>
							<th scope="col">Field Attributes</th>
							<th scope="col">Field Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#autoLoad">autoLoad</a></b>
								</div>
								<div class="description">创建对象时是否自动加载</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#dataType">dataType</a></b>
								</div>
								<div class="description">加载数据时，返回的格式,目前只支持"json","data"格式<br></div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#matchFunction">matchFunction</a></b>
								</div>
								<div class="description">对象的匹配函数，验证两个对象是否相当</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#params">params</a></b>
								</div>
								<div class="description">自定义参数，用于加载数据时发送到后台</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#proxy">proxy</a></b>
								</div>
								<div class="description">连接信息，包含2个字段:<br>url : 加载数据的地址<br>method : 加载数据的方式"get","post"，默认值为"post"</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#remoteSort">remoteSort</a></b>
								</div>
								<div class="description">是否后端排序，如果为后端排序，每次排序发送新请求，否则，直接前端排序</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#root">root</a></b>
								</div>
								<div class="description">加载数据时，返回数据的根目录</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#sortInfo">sortInfo</a></b>
								</div>
								<div class="description">排序信息</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#totalProperty">totalProperty</a></b>
								</div>
								<div class="description">加载数据时，符合条件的数据总数，用于分页</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/Grid.Store.html#url">url</a></b>
								</div>
								<div class="description">是字段 proxy.url的简写方式，可以直接写在配置信息中</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			

<!-- ============================== methods summary ======================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class Grid.Store.">
					<caption>Method Summary</caption>
					<thead>
						<tr>
							<th scope="col">Method Attributes</th>
							<th scope="col">Method Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#add">add</a></b>(data, noRepeat, match)
								</div>
								<div class="description">添加记录</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#compare">compare</a></b>(obj1, obj2, field, direction)
								</div>
								<div class="description">store的比较函数</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#compareFunction">compareFunction</a></b>(obj1, obj2)
								</div>
								<div class="description"></div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#contains">contains</a></b>(record, match)
								</div>
								<div class="description">验证是否存在指定记录</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#find">find</a></b>(field, value)
								</div>
								<div class="description">查找记录，仅返回第一条</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#findAll">findAll</a></b>(field, value)
								</div>
								<div class="description">查找记录，返回所有符合查询条件的记录</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#findIndexBy">findIndexBy</a></b>(target, func)
								</div>
								<div class="description">查找数据所在的索引位置,若不存在返回-1</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#getCount">getCount</a></b>()
								</div>
								<div class="description">获取加载完的数据的数量</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#getResult">getResult</a></b>()
								</div>
								<div class="description">获取加载完的数据</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#getTotalCount">getTotalCount</a></b>()
								</div>
								<div class="description">获取表格源数据的总数</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#load">load</a></b>(params)
								</div>
								<div class="description">加载数据,若不提供参数时，按照上次请求的参数加载数据</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#remove">remove</a></b>(data, match)
								</div>
								<div class="description">删除记录触发 removerecords 事件.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#setResult">setResult</a></b>(data)
								</div>
								<div class="description">设置数据，在不自动加载数据时，可以自动填充数据，会触发 load事件</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#setValue">setValue</a></b>(obj, field, value, isMatch)
								</div>
								<div class="description">设置记录的值 ，触发 updaterecord 事件</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#sort">sort</a></b>(field, direction)
								</div>
								<div class="description">排序，根据Store的配置进行，前端排序或发送请求重新加载数据远程排序，触发load事件，前端排序触发localsort事件</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#update">update</a></b>(obj, isMatch)
								</div>
								<div class="description">更新记录 ，触发 updaterecord 事件</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			
<!-- ============================== events summary ======================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the events documented in the class Grid.Store.">
					<caption>Event Summary</caption>
					<thead>
						<tr>
							<th scope="col">Event Attributes</th>
							<th scope="col">Event Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#event:addrecords">addrecords</a></b>(e)
								</div>
								<div class="description">当添加数据时触发该事件</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#event:beforeload">beforeload</a></b>()
								</div>
								<div class="description">当数据加载前</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#event:beforeProcessLoad">beforeProcessLoad</a></b>(e)
								</div>
								<div class="description">发生在，beforeload和load中间，数据已经获取完成，但是还未触发load事件，用于获取返回的原始数据</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#event:load">load</a></b>(e)
								</div>
								<div class="description">当数据加载完成后</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#event:localsort">localsort</a></b>(e)
								</div>
								<div class="description">前端发生排序时触发</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#event:removerecords">removerecords</a></b>(e)
								</div>
								<div class="description">当删除数据是触发该事件</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/Grid.Store.html#event:updaterecord">updaterecord</a></b>(e)
								</div>
								<div class="description">当更新数据指定字段时触发该事件</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			

<!-- ============================== constructor details ==================== -->		
			
			<div class="details"><a name="constructor"> </a>
				<div class="sectionTitle">
					Class Detail
				</div>
				
				<div class="fixedFont">
						<b>Grid.Store</b>(config)
				</div>
				
				<div class="description">
					数据缓冲类，缓存数据在浏览器中
					
				</div>
				
				
				
				<pre class="code">var store = new  Grid.Store({	url : 'data.php',	autoLoad : true});</pre>
				
				
				
				
					
						<dl class="detailList">
						<dt class="heading">Parameters:</dt>
						
							<dt>
								<span class="light fixedFont">{Object}</span>  <b>config</b>
								
							</dt>
								<dd>配置项，store上面的field字段可以传入配置项中</dd>
						
						</dl>
					
					
					
					
					
					
					

			</div>
			

<!-- ============================== field details ========================== -->		
			
				<div class="sectionTitle">
					Field Detail
				</div>
				
					<a name="autoLoad"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>autoLoad</b>
					
					</div>
					<div class="description">
						创建对象时是否自动加载
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								false
							</dd>
							</dl>
						

					<hr />
				
					<a name="dataType"> </a>
					<div class="fixedFont">
					
					<span class="light">{String}</span>
					<b>dataType</b>
					
					</div>
					<div class="description">
						加载数据时，返回的格式,目前只支持"json","data"格式<br>
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								"json"
							</dd>
							</dl>
						

					<hr />
				
					<a name="matchFunction"> </a>
					<div class="fixedFont">
					
					<span class="light">{Function}</span>
					<b>matchFunction</b>
					
					</div>
					<div class="description">
						对象的匹配函数，验证两个对象是否相当
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								function(obj1,obj2){return obj1==obj2};
							</dd>
							</dl>
						

					<hr />
				
					<a name="params"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>params</b>
					
					</div>
					<div class="description">
						自定义参数，用于加载数据时发送到后台
						
						
					</div>
					
					
					
					<pre class="code">var store = new Grid.Store({		url :'data',		autoLoad : true,		params: {id:'124',type:1}//自定义参数	});</pre>
					
					

						
						
						
						

					<hr />
				
					<a name="proxy"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>proxy</b>
					
					</div>
					<div class="description">
						连接信息，包含2个字段:<br>url : 加载数据的地址<br>method : 加载数据的方式"get","post"，默认值为"post"
						
						
					</div>
					
					
					
					<pre class="code">var store = new Grid.Store({		autoLoad : true,		proxy: {url : 'data.php', method: 'get' }//按照'name' 字段降序排序	});</pre>
					
					

						
						
						
						

					<hr />
				
					<a name="remoteSort"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>remoteSort</b>
					
					</div>
					<div class="description">
						是否后端排序，如果为后端排序，每次排序发送新请求，否则，直接前端排序
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								false
							</dd>
							</dl>
						

					<hr />
				
					<a name="root"> </a>
					<div class="fixedFont">
					
					<span class="light">{String}</span>
					<b>root</b>
					
					</div>
					<div class="description">
						加载数据时，返回数据的根目录
						
						
					</div>
					
					
					
					<pre class="code">'{"rows":[{"name":"abc"},{"name":"bcd"}],"results":100}'</pre>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								"rows"
							</dd>
							</dl>
						

					<hr />
				
					<a name="sortInfo"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>sortInfo</b>
					
					</div>
					<div class="description">
						排序信息
						
						
					</div>
					
					
					
					<pre class="code">var store = new Grid.Store({		url : 'data.php',		autoLoad : true,		sortInfo: { field: 'name', direction: 'DESC' }//按照'name' 字段降序排序	});</pre>
					
					

						
						
						
						

					<hr />
				
					<a name="totalProperty"> </a>
					<div class="fixedFont">
					
					<span class="light">{String}</span>
					<b>totalProperty</b>
					
					</div>
					<div class="description">
						加载数据时，符合条件的数据总数，用于分页
						
						
					</div>
					
					
					
					<pre class="code">'{"rows":[{"name":"abc"},{"name":"bcd"}],"results":100}'</pre>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								"results"
							</dd>
							</dl>
						

					<hr />
				
					<a name="url"> </a>
					<div class="fixedFont">
					
					<span class="light">{String}</span>
					<b>url</b>
					
					</div>
					<div class="description">
						是字段 proxy.url的简写方式，可以直接写在配置信息中
						
						
					</div>
					
					

						
						
						
						

					
				
			

<!-- ============================== method details ========================= -->		
			
				<div class="sectionTitle">
					Method Detail
				</div>
				
					<a name="add"> </a>
					<div class="fixedFont">
					
					
					<b>add</b>(data, noRepeat, match)
					
					</div>
					<div class="description">
						添加记录
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Array|Object}</span> <b>data</b>
									
								</dt>
								<dd>添加的数据，可以是数组，可以是单条记录</dd>
							
								<dt>
									<span class="light fixedFont">{Boolean}</span> <b>noRepeat</b>
									<i>Optional, Default:  false</i>
								</dt>
								<dd>是否去重,可以为空，默认： false</dd>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>match</b>
									<i>Optional</i>
								</dt>
								<dd>匹配函数，可以为空，默认是：<br> function(obj1,obj2){	 return obj1 == obj2; }</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="compare"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>compare</b>(obj1, obj2, field, direction)
					
					</div>
					<div class="description">
						store的比较函数
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>obj1</b>
									
								</dt>
								<dd>进行比较的记录1</dd>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>obj2</b>
									
								</dt>
								<dd>进行比较的记录2</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>field</b>
									<i>Optional</i>
								</dt>
								<dd>进行排序的字段,默认为 sortInfo.field</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>direction</b>
									<i>Optional</i>
								</dt>
								<dd>进行排序的方向,默认为 sortInfo.direction 包括‘ASC’，‘DESC'</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> 当 obj1 > obj2 时返回 1当 obj1 = obj2 时返回 0 当 obj1 < obj2 时返回 -1</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="compareFunction"> </a>
					<div class="fixedFont">
					
					
					<b>compareFunction</b>(obj1, obj2)
					
					</div>
					<div class="description">
						
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<b>obj1</b>
									
								</dt>
								<dd></dd>
							
								<dt>
									<b>obj2</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="contains"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>contains</b>(record, match)
					
					</div>
					<div class="description">
						验证是否存在指定记录
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>record</b>
									
								</dt>
								<dd>指定的记录</dd>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>match</b>
									<i>Optional, Default:  function(obj1,obj2){return obj1 == obj2}</i>
								</dt>
								<dd>默认为比较2个对象是否相同</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="find"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object|null}</span>
					<b>find</b>(field, value)
					
					</div>
					<div class="description">
						查找记录，仅返回第一条
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>field</b>
									
								</dt>
								<dd>字段名</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>value</b>
									
								</dt>
								<dd>字段值</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Object|null}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="findAll"> </a>
					<div class="fixedFont">
					
					<span class="light">{Array}</span>
					<b>findAll</b>(field, value)
					
					</div>
					<div class="description">
						查找记录，返回所有符合查询条件的记录
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>field</b>
									
								</dt>
								<dd>字段名</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>value</b>
									
								</dt>
								<dd>字段值</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Array}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="findIndexBy"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>findIndexBy</b>(target, func)
					
					</div>
					<div class="description">
						查找数据所在的索引位置,若不存在返回-1
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>target</b>
									
								</dt>
								<dd>指定的记录</dd>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>func</b>
									<i>Optional, Default:  function(obj1,obj2){return obj1 == obj2}</i>
								</dt>
								<dd>默认为比较2个对象是否相同</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="getCount"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>getCount</b>()
					
					</div>
					<div class="description">
						获取加载完的数据的数量
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="getResult"> </a>
					<div class="fixedFont">
					
					<span class="light">{Array}</span>
					<b>getResult</b>()
					
					</div>
					<div class="description">
						获取加载完的数据
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Array}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="getTotalCount"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>getTotalCount</b>()
					
					</div>
					<div class="description">
						获取表格源数据的总数
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="load"> </a>
					<div class="fixedFont">
					
					
					<b>load</b>(params)
					
					</div>
					<div class="description">
						加载数据,若不提供参数时，按照上次请求的参数加载数据
						
						
					</div>
					
					
					
					<pre class="code">store.load({id : 1234, type : 1});</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>params</b>
									<i>Optional</i>
								</dt>
								<dd>自定义参数以对象形式提供</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="remove"> </a>
					<div class="fixedFont">
					
					
					<b>remove</b>(data, match)
					
					</div>
					<div class="description">
						删除记录触发 removerecords 事件.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Array|Object}</span> <b>data</b>
									
								</dt>
								<dd>添加的数据，可以是数组，可以是单条记录</dd>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>match</b>
									<i>Optional, Default:  function(obj1,obj2){return obj1 == obj2}</i>
								</dt>
								<dd>匹配函数，可以为空</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="setResult"> </a>
					<div class="fixedFont">
					
					
					<b>setResult</b>(data)
					
					</div>
					<div class="description">
						设置数据，在不自动加载数据时，可以自动填充数据，会触发 load事件
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Array}</span> <b>data</b>
									
								</dt>
								<dd>设置的数据集合，是一个数组</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="setValue"> </a>
					<div class="fixedFont">
					
					
					<b>setValue</b>(obj, field, value, isMatch)
					
					</div>
					<div class="description">
						设置记录的值 ，触发 updaterecord 事件
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>obj</b>
									
								</dt>
								<dd>修改的记录</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>field</b>
									
								</dt>
								<dd>修改的字段名</dd>
							
								<dt>
									<span class="light fixedFont">{Any Type}</span> <b>value</b>
									
								</dt>
								<dd>修改的值</dd>
							
								<dt>
									<span class="light fixedFont">{Boolean}</span> <b>isMatch</b>
									<i>Optional, Default:  false</i>
								</dt>
								<dd>是否需要进行匹配，检测指定的记录是否在集合中</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="sort"> </a>
					<div class="fixedFont">
					
					
					<b>sort</b>(field, direction)
					
					</div>
					<div class="description">
						排序，根据Store的配置进行，前端排序或发送请求重新加载数据远程排序，触发load事件，前端排序触发localsort事件
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>field</b>
									
								</dt>
								<dd>排序字段</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>direction</b>
									
								</dt>
								<dd>排序方向</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="update"> </a>
					<div class="fixedFont">
					
					
					<b>update</b>(obj, isMatch)
					
					</div>
					<div class="description">
						更新记录 ，触发 updaterecord 事件
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>obj</b>
									
								</dt>
								<dd>修改的记录</dd>
							
								<dt>
									<span class="light fixedFont">{Boolean}</span> <b>isMatch</b>
									<i>Optional, Default:  false</i>
								</dt>
								<dd>是否需要进行匹配，检测指定的记录是否在集合中</dd>
							
							</dl>
						
						
						
						
						
						
						

					
				
			
			
<!-- ============================== event details ========================= -->		
			
				<div class="sectionTitle">
					Event Detail
				</div>
				
					<a name="event:addrecords"> </a>
					<div class="fixedFont">
					
					
					<b>addrecords</b>(e)
					
					</div>
					<div class="description">
						当添加数据时触发该事件
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{event}</span> <b>e</b>
									
								</dt>
								<dd>事件对象</dd>
							
								<dt>
									<span class="light fixedFont">{Array}</span> <b>e.data</b>
									
								</dt>
								<dd>添加的数据集合</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="event:beforeload"> </a>
					<div class="fixedFont">
					
					
					<b>beforeload</b>()
					
					</div>
					<div class="description">
						当数据加载前
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="event:beforeProcessLoad"> </a>
					<div class="fixedFont">
					
					
					<b>beforeProcessLoad</b>(e)
					
					</div>
					<div class="description">
						发生在，beforeload和load中间，数据已经获取完成，但是还未触发load事件，用于获取返回的原始数据
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{event}</span> <b>e</b>
									
								</dt>
								<dd>事件对象</dd>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>e.data</b>
									
								</dt>
								<dd>从服务器端返回的数据</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="event:load"> </a>
					<div class="fixedFont">
					
					
					<b>load</b>(e)
					
					</div>
					<div class="description">
						当数据加载完成后
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{event}</span> <b>e</b>
									
								</dt>
								<dd>事件对象，包含加载数据时的参数</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="event:localsort"> </a>
					<div class="fixedFont">
					
					
					<b>localsort</b>(e)
					
					</div>
					<div class="description">
						前端发生排序时触发
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{event}</span> <b>e</b>
									
								</dt>
								<dd>事件对象</dd>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>e.field</b>
									
								</dt>
								<dd>排序的字段</dd>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>e.direction</b>
									
								</dt>
								<dd>排序的方向 'ASC'，'DESC'</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="event:removerecords"> </a>
					<div class="fixedFont">
					
					
					<b>removerecords</b>(e)
					
					</div>
					<div class="description">
						当删除数据是触发该事件
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{event}</span> <b>e</b>
									
								</dt>
								<dd>事件对象</dd>
							
								<dt>
									<span class="light fixedFont">{Array}</span> <b>e.data</b>
									
								</dt>
								<dd>删除的数据集合</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="event:updaterecord"> </a>
					<div class="fixedFont">
					
					
					<b>updaterecord</b>(e)
					
					</div>
					<div class="description">
						当更新数据指定字段时触发该事件
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{event}</span> <b>e</b>
									
								</dt>
								<dd>事件对象</dd>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>e.record</b>
									
								</dt>
								<dd>更新的数据</dd>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>e.field</b>
									
								</dt>
								<dd>更新的字段</dd>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>e.value</b>
									
								</dt>
								<dd>更新的值</dd>
							
							</dl>
						
						
						
						
						
						
						

					
				
			
			
			<hr />
		</div>

		
<!-- ============================== footer ================================= -->
		<div class="fineprint" style="clear:both">
			
			Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Fri Dec 23 2011 18:37:18 GMT+0800 (CST)
		</div>
	</body>
</html>
